<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var arr = [21,20,18,23,25,32];
        // arr.sort(function (a,b) {
        //     return a-b;
        // })
        // console.log(arr);

            // var arr = [{age:21},{age:20},{age:18},{age:23},{age:25},{age:32}];
            // arr.sort(function (a,b) {
            //     return a.age-b.age;
            // })
            // console.log(arr);


    </script>
</body>
</html>